package test;

import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.InputStreamReader;

import building.AuxInfo;
import building.Cell;
import building.InfoGame;

public class ProvaForats {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			Cell[][] map = new Cell[10][10];
			FileInputStream fstream = new FileInputStream("map2.txt");
			// Get the object of DataInputStream
			BufferedReader br = new BufferedReader(new InputStreamReader(
					new DataInputStream(fstream)));
			for (int i = 0; i < 10; i++) {
				String linia = br.readLine();
				for (int j = 0; j < 10; j++) {
					String character;
					character = Character.toString(linia.charAt(j));
					if (character.equals("O")) {
						map[i][j] = new Cell(Cell.FREE);
						System.out.print("O");
					} else if (character.equals("P")) {
						map[i][j] = new Cell(Cell.OBJECT);
						System.out.print("P");
					} else if (character.equals("X")) {
						map[i][j] = new Cell(Cell.FIRE);
						System.out.print("X");
					}
				}
				System.out.println();
			}

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	InfoGame test1 = new InfoGame();

}
